package com.zhao.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MvcConfig implements WebMvcConfigurer {

    //通过这个配置就不用为每个thymeleaf模板页面单独开发一个controller了
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("test").setViewName("test");
        registry.addViewController("/").setViewName("login");
        System.out.println("c-v映射 loading");
        ///new 学生
        registry.addViewController("studentIndex").setViewName("studentIndex");
        registry.addViewController("student-findEbickAndDL").setViewName("student-findEbickAndDL");
        registry.addViewController("student-scan").setViewName("student-scan");

        registry.addViewController("newShowDrivingLicense").setViewName("newShowDrivingLicense");
        registry.addViewController("500").setViewName("500");
        registry.addViewController("newStudentFinishInfo").setViewName("newStudentFinishInfo");
        registry.addViewController("newEbickRegist").setViewName("newEbickRegist");
        registry.addViewController("newShowMyEbick").setViewName("newShowMyEbick");
        registry.addViewController("newStudentSupervise").setViewName("newStudentSupervise");
        registry.addViewController("newShowMySupervise").setViewName("newShowMySupervise");
        registry.addViewController("newShowSuperviseMe").setViewName("newShowSuperviseMe");
        registry.addViewController("newStudentCorrect").setViewName("newStudentCorrect");
        registry.addViewController("newStudentAppeal").setViewName("newStudentAppeal");
        registry.addViewController("newStudent-showAllPublicize").setViewName("newStudent-showAllPublicize");
        registry.addViewController("newStudent-browsePublicize").setViewName("newStudent-browsePublicize");
        registry.addViewController("newStudent-uploadEbickGoods").setViewName("newStudent-uploadEbickGoods");
        registry.addViewController("newStudent-allMyEbickGoods").setViewName("newStudent-allMyEbickGoods");
        registry.addViewController("newStudent-updateEbickGoods").setViewName("newStudent-updateEbickGoods");
        registry.addViewController("newStudent-seeAllEbickGoods").setViewName("newStudent-seeAllEbickGoods");
        registry.addViewController("newStudent-seeAllMyBuyOrders").setViewName("newStudent-seeAllMyBuyOrders");
        registry.addViewController("newStudent-seeAllMySellOrders").setViewName("newStudent-seeAllMySellOrders");
        registry.addViewController("student-myWallet").setViewName("student-myWallet");
        registry.addViewController("student-creatOneWallet").setViewName("student-creatOneWallet");


        //辅导员
        registry.addViewController("schoolCounsellorIndex").setViewName("schoolCounsellorIndex");
        registry.addViewController("newSchoolCounsellorFinishInfo").setViewName("newSchoolCounsellorFinishInfo");
        registry.addViewController("newShowApplicationOfDL").setViewName("newShowApplicationOfDL");
        registry.addViewController("newRejectApplicationReason").setViewName("newRejectApplicationReason");
        registry.addViewController("newShowCancelDLApplication").setViewName("newShowCancelDLApplication");
        registry.addViewController("newRejectCancelReason").setViewName("newRejectCancelReason");
        registry.addViewController("newShowSuperviseMyStudent").setViewName("newShowSuperviseMyStudent");
        registry.addViewController("new-schoolCounsellor-editorPublicize").setViewName("new-schoolCounsellor-editorPublicize");
        registry.addViewController("newShow-AllMyPublicity").setViewName("newShow-AllMyPublicity");
        registry.addViewController("new-browsePublicize").setViewName("new-browsePublicize");
        registry.addViewController("newSchoolCounsellor-showAllPublicize").setViewName("newSchoolCounsellor-showAllPublicize");
        registry.addViewController("schoolCounsellor-seeAllTR").setViewName("schoolCounsellor-seeAllTR");
        registry.addViewController("schoolCounsellor-seeAllOrders").setViewName("schoolCounsellor-seeAllOrders");


        ///管理员
        registry.addViewController("adminLogin").setViewName("adminLogin");
        registry.addViewController("adminIndex").setViewName("adminIndex");
        registry.addViewController("admin-browseOnePublicize").setViewName("admin-browseOnePublicize");
        registry.addViewController("admin-allStudents").setViewName("admin-allStudents");
        registry.addViewController("admin-addStudents").setViewName("admin-addStudents");
        registry.addViewController("admin-addSchoolCounsellor").setViewName("admin-addSchoolCounsellor");
        registry.addViewController("admin-addSuperviser").setViewName("admin-addSuperviser");
        registry.addViewController("admin-allSchoolCounsellor").setViewName("admin-allSchoolCounsellor");
        registry.addViewController("admin-allSupervisers").setViewName("admin-allSupervisers");
        registry.addViewController("admin-adminOneStudent").setViewName("admin-adminOneStudent");
        registry.addViewController("admin-adminOneSchoolCounsellor").setViewName("admin-adminOneSchoolCounsellor");
        registry.addViewController("admin-allEbicks").setViewName("admin-allEbicks");
        registry.addViewController("admin-adminOneEbick").setViewName("admin-adminOneEbick");
        registry.addViewController("admin-allDL").setViewName("admin-allDL");
        registry.addViewController("admin-adminOneDL").setViewName("admin-adminOneDL");
        registry.addViewController("admin-allSupervises").setViewName("admin-allSupervises");
        registry.addViewController("admin-adminOneSuperviseForm").setViewName("admin-adminOneSuperviseForm");
        registry.addViewController("admin-editorPublicize").setViewName("admin-editorPublicize");
        registry.addViewController("admin-allPublicize").setViewName("admin-allPublicize");
        registry.addViewController("admin-seeAllTR").setViewName("admin-seeAllTR");
        registry.addViewController("admin-seeAllOrders").setViewName("admin-seeAllOrders");


        //superviser
        registry.addViewController("superviser-index").setViewName("superviser-index");
        registry.addViewController("superviser-scanQR").setViewName("superviser-scanQR");
        registry.addViewController("superviser-supervise").setViewName("superviser-supervise");
        registry.addViewController("superviser-findDrivingLicense").setViewName("superviser-findDrivingLicense");
        registry.addViewController("superviser-searchOrScan").setViewName("superviser-searchOrScan");
        registry.addViewController("superviser-allSupervises").setViewName("superviser-allSupervises");
        registry.addViewController("superviser-browseOnePublicize").setViewName("superviser-browseOnePublicize");



        ////old
        registry.addViewController("aa-mojing").setViewName("aa-mojing");

        registry.addViewController("login").setViewName("login");
        registry.addViewController("dashboard").setViewName("dashboard");
        registry.addViewController("list").setViewName("list");
        registry.addViewController("index").setViewName("index");
        registry.addViewController("add").setViewName("add");
        registry.addViewController("appeal").setViewName("appeal");
        registry.addViewController("404").setViewName("404");
        registry.addViewController("regist").setViewName("regist");
        registry.addViewController("show").setViewName("show");
        registry.addViewController("supervise").setViewName("supervise");
        registry.addViewController("ebickRegist").setViewName("ebickRegist");
        registry.addViewController("uploadimg").setViewName("uploadimg");
        registry.addViewController("test").setViewName("test");
        registry.addViewController("showDrivingLicense").setViewName("showDrivingLicense");
        registry.addViewController("finishStudentInfo").setViewName("finishStudentInfo");
        registry.addViewController("showMySupersive").setViewName("showMySupersive");
        registry.addViewController("showSuperviseMe").setViewName("showSuperviseMe");
        registry.addViewController("editor").setViewName("editor");
        registry.addViewController("correct").setViewName("correct");
        registry.addViewController("noDrivingLicense").setViewName("noDrivingLicense");
        registry.addViewController("showAllMyEbick").setViewName("showAllMyEbick");
        registry.addViewController("showApplicationOfDrivingLicense").setViewName("showApplicationOfDrivingLicense");
        registry.addViewController("cancelReason").setViewName("cancelReason");
        registry.addViewController("showCancelDrivingLicenseApplication").setViewName("showCancelDrivingLicenseApplication");
        registry.addViewController("rejectCancelReason").setViewName("rejectCancelReason");
        registry.addViewController("rejectApplicationOfDrivingLicenseReason").setViewName("rejectApplicationOfDrivingLicenseReason");
        registry.addViewController("superviserSupervise").setViewName("superviserSupervise");
        registry.addViewController("superviserFindDrivingLicense").setViewName("superviserFindDrivingLicense");
        registry.addViewController("showSuperviserMySupervise").setViewName("showSuperviserMySupervise");
        registry.addViewController("showDrivingLicenseToSuperviser").setViewName("showDrivingLicenseToSuperviser");
        registry.addViewController("showSuperviseMyStudent").setViewName("showSuperviseMyStudent");
        registry.addViewController("showAllMyPublicize").setViewName("showAllMyPublicize");
        System.out.println("c-v映射 loading finished");
    }
}
